package me.luger.project.base.config.filter;

import me.luger.core.mvc.filter.access.AccessFilter;
import me.luger.core.mvc.filter.pagecache.PageCacheFilter;
import org.springframework.boot.context.embedded.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;

import javax.servlet.Filter;

/**
 * FilterConfig
 *
 * @author luger
 * @date 2016/9/27 0027
 */
@Configuration
public class MyFilterConfig {

    @Bean
    @Order(1)
    Filter accessLogFilter() {
        return new AccessFilter();
    }

    @Bean
    @Order(2)
    Filter pageCacheFilter() {
        return new PageCacheFilter();
    }
}
